package com.imooc.security.demo.service;

import com.imooc.security.demo.object.UserVo;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * @Author sherry
 * @Description
 * @Date Create in 2019-03-13
 * @Modified By:
 */
@Service
public class UserService {

    private static final List<UserVo> list = Arrays.asList(
            new UserVo().setUserId(1L).setName("姓名1")
            , new UserVo().setUserId(2L).setName("姓名2")
            , new UserVo().setUserId(3L).setName("姓名3")
    );


    public UserVo getUserInfo(Long userId) {
        return list.get(Integer.parseInt(String.valueOf(userId)));
    }
}
